/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Alex
 */
@Entity
@Table(name = "T05_NOTE_TYPE")
@NamedQueries({
    @NamedQuery(name = "NoteType.findAll", query = "SELECT n FROM NoteType n"),
    @NamedQuery(name = "NoteType.findById", query = "SELECT n FROM NoteType n WHERE n.id = :id"),
    @NamedQuery(name = "NoteType.findByType", query = "SELECT n FROM NoteType n WHERE n.type = :type"),
    @NamedQuery(name = "NoteType.findByColor", query = "SELECT n FROM NoteType n WHERE n.color = :color")})
public class NoteType implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID")
    private Long id;
    @Basic(optional = false)
    @Column(name = "TYPE")
    private String type;
    @Basic(optional = false)
    @Column(name = "COLOR")
    private String color;

    

    public NoteType() {
    }

    public NoteType(Long id) {
        this.id = id;
    }

    public NoteType(Long id, String type, String color) {
        this.id = id;
        this.type = type;
        this.color = color;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NoteType)) {
            return false;
        }
        NoteType other = (NoteType) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.NoteType[id=" + id + "]";
    }

}
